﻿Imports System.Data.OracleClient
Imports WindowsApplication1.funciones1
'Imports System.Data
Imports Microsoft.Data.Odbc
Public Class Impresion

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_rtf.Click
        Dim cadena As String = "FORMATO_FACTURA.rtf"

        Try
            RichTextBox1.LoadFile(cadena)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_guardar.Click

        SaveFileDialog1.ShowDialog()
        Try
            RichTextBox1.SaveFile(SaveFileDialog1.FileName)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub btn_imprimir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_imprimir.Click

        PrintDocument1.Print()

    End Sub

    Private Sub Impresion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim querycombo As String = "SELECT * FROM TB_VNT_FACTURA"
        Dim valuecombo As String = "ID_FACTURA" 'valor a insertar en tabla de acuerdo al combo
        Dim displaycombo As String = "ID_FACTURA" 'valor a mostrar en el combo
        llenarcombo(cmb_factura, querycombo, valuecombo, displaycombo)
    End Sub
End Class